import request from '@/utils/request'

export default {
	/**
	 * @method证明广告看完的接口
	 */
	record(adId) {
		return request({
			url: `/advert/ad/add/adPlay/record/${adId}`,
			method: 'get',
		})
	},
	
	/**
	 * @method广告播放记录
	 */
	advertrecord(data) {
		return request({
			url: `/advert/ad/select/createAd/adPlay/record`,
			method: 'get',
			data
		})
	},
	
	/**
	 * @method获取范围内广告
	 */
	advertrandom(data) {
		return request({
			url: `/advert/ad/select/random/ad`,
			method: 'get',
			data
		})
	},
	
	/**
	 * @method广告支付 
	 */
	advertPay(data) {
		return request({
			url: `/advert/ad/pay/ad/${data.id}/${data.payWay}${data.payPassword ? '/' + data.payPassword :'' }`,
			method: 'get',
			data
		})
	},
	
	/**
	 * @method广告新增
	 */
	advertaddAd(data) {
		return request({
			url: `/advert/ad/addAd`,
			method: 'post',
			data
		})
	},
	
	/**
	 * @method查询商户是否有正在进行中的广告订单
	 */
	userBackad() {
		return request({
			url: `/advert/ad/select/user/backad`,
			method: 'get',
		})
	},
	
	/**
	 * @method商家所有商品
	 */
	storesProd() {
		return request({
			url: `/advert/ad/select/user/stores/prod`,
			method: 'get',
		})
	},
	
}